/*
 * @Author: chenhuanhuan 2925102113@qq.com
 * @Date: 2025-04-14 14:57:45
 * @LastEditors: chenhuanhuan 2925102113@qq.com
 * @LastEditTime: 2025-04-23 16:10:15
 * @FilePath: \react-demo\src\pages\Home\index.jsx
 */

import React, { Component } from "react";
import { Routes, Route ,Outlet} from "react-router-dom";
import HomeMsg from "./components/homeMsg";
import HomeNew from "./components/homeNew";
import MyNavLink from "../../components/MyNavLink";
export default class Home extends Component {
  render() {
    return (
      <div>
        <h3>home组件的内容</h3>
        <div style={{ display: "flex" }}>
          {/* <p
            style={{ padding: "5px", border: "1px solid #ccc", margin: "4px" }}
          >
            news
          </p>
          <p
            style={{ padding: "5px", border: "1px solid #ccc", margin: "4px" }}
          >
            message
          </p> */}
          <MyNavLink to="/home/news" >news</MyNavLink>
          <MyNavLink to="/home/msgs" >message</MyNavLink>

          {/* <Outlet /> */}
          <Routes>
            <Route path="/news" element={<HomeNew/>}></Route>
            <Route path="/msgs" element={<HomeMsg/>}></Route>
          </Routes>
        </div>
      </div>
    );
  }
}
